import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

class Route {
  Route({required this.title, required this.path});
  final String title;
  final String path;
}

class AppHome extends StatefulWidget {
  const AppHome({Key? key}) : super(key: key);

  @override
  _AppHomeState createState() => _AppHomeState();
}

class _AppHomeState extends State<AppHome> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('hello'),
          backgroundColor: Theme.of(context).indicatorColor,
        ),
        body: ListView(children: [
          ListTile(
            title: const Text('tabs标签页'),
            onTap: () {
              context.go('/tabs');
            },
          ),
          ListTile(
            title: const Text('列表页'),
            onTap: () {
              context.go('/list');
            },
          ),
          ListTile(
            title: const Text('md-1布局示例1'),
            onTap: () {
              context.go('/md-1-1');
            },
          ),
          ListTile(
            title: const Text('md-1布局示例2'),
            onTap: () {
              context.go('/md-1-2');
            },
          )
        ]));
  }
}
